import request from '@/config/axios'

// 联培学生信息变更审批 VO
export interface ImrStudentInfoVerifyVO {
  id: number // 主键
  accountId: number // 申请账号ID
  studentCode: string // 冗余-学号
  studentName: string // 冗余-学生姓名
  studentGrade: string // 冗余-年级
  studentClass: string // 冗余-班级
  verifyType: string // 审核类型(管理员修改/学生修改)
  verifyStatus: string // 审核状态
  modifyFields: string // 修改字段
  oldValue: string // 旧值
  newValue: string // 新值
  remark: string // 备注
  reviewer: number // 审核人ID
  reviewerName: string // 审核人姓名
  reviewTime: Date // 审核时间
  reviewComments: string // 审核意见
}

// 联培学生信息变更审批 API
export const ImrStudentInfoVerifyApi = {
  // 查询联培学生信息变更审批分页
  getImrStudentInfoVerifyPage: async (params: any) => {
    return await request.get({ url: `/core/imr-student-info-verify/page`, params })
  },

  // 查询联培学生信息变更审批详情
  getImrStudentInfoVerify: async (id: number) => {
    return await request.get({ url: `/core/imr-student-info-verify/get?id=` + id })
  },

  // 新增联培学生信息变更审批
  createImrStudentInfoVerify: async (data: ImrStudentInfoVerifyVO) => {
    return await request.post({ url: `/core/imr-student-info-verify/create`, data })
  },

  // 修改联培学生信息变更审批
  updateImrStudentInfoVerify: async (data: ImrStudentInfoVerifyVO) => {
    return await request.put({ url: `/core/imr-student-info-verify/update`, data })
  },

  // 删除联培学生信息变更审批
  deleteImrStudentInfoVerify: async (id: number) => {
    return await request.delete({ url: `/core/imr-student-info-verify/delete?id=` + id })
  },

  // 导出联培学生信息变更审批 Excel
  exportImrStudentInfoVerify: async (params) => {
    return await request.download({ url: `/core/imr-student-info-verify/export-excel`, params })
  },

  // 管理员修改联培学生信息
  adminModifyImrStudent: async (data: Partial<ImrStudentInfoVerifyVO>) => {
    return await request.put({ url: `/core/imr-student-info-verify/admin-modify-student`, data })
  },

  // 修改联培学生信息变更审批
  adminVerifyImrStudentInfo: async (data: Partial<ImrStudentInfoVerifyVO>) => {
    return await request.put({ url: `/core/imr-student-info-verify/admin-verify`, data })
  }
}
